package com.hn.utils.random;
import java.util.Random;

public class RandomUtil {
    public static int RandomNumberByNext(int next){
        Random rand = new Random();
        return rand.nextInt(next);
    }
    //生成随机数 从数组里[60,120,180,240,300,360,420,480,540,600]随机抽取一个返回
    public static int RandomNumberByArray(){
        int[] array = {60,120,180};
        Random rand = new Random();
        int index = rand.nextInt(array.length);
        return array[index];
    }
}
